package clientrequest;

import java.util.Vector;

import android.util.Log;

/**
 * RequestBuddyAccept
 * 
 * @brief Sends a request to the server to accept/reject a buddy invitation.
 * @author brian
 *
 */
public class RequestBuddyAccept extends RequestToServer {
	public static final String TAG = RequestBuddyAccept.class.getSimpleName();
    @Override
    public void send(short requestCode, Vector args) {

    // Protocol: (String) buddyName, (boolean) accept/reject
    	String buddyName = (String) args.get(0);
    	short acceptBuddy = (Short) args.get(1);

   		short sizeofrequest =(short)(4+4+4*(buddyName.length()));
        super.writeShort(sizeofrequest);
        super.writeShort(requestCode);
        super.writeString(buddyName);
        super.writeShort(acceptBuddy);
    }

}
